/**
 * SelectTestCase.java : [com.raccoon.ibatis.testcase] Created on 2009. 4. 13.
 *
 * Copyright (c) 2009 Raccoon Project Team.
 * Seoul, Korea
 * All rights reserved.
 *
 */
package com.raccoon.ibatis.testcase;

import static org.junit.Assert.*;

import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import com.raccoon.ibatis.bean.MemberExBean;
import com.raccoon.ibatis.config.IBatisService;

/**
 * @author KimJungSu
 * @version
 *
 */
public class SelectTestCase {

	public static IBatisService	service = IBatisService.getInstance();
	
	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
	}

	@AfterClass
	public static void tearDownAfterClass() throws Exception {
	}

	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Deprecated
	public void testSelectMemberAll() {
		//fail("Not yet implemented");
		HashMap map = new HashMap();
		// TODO make map for testcase
		map.put("USRE_KEY", "0");

		try {
			service.selectMemberAll(map);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	@Deprecated
	public void testSelectMemberWithUserKey() {
		MemberExBean	member = null;

		try {
			member = service.selectMemberWithUserKey(10);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		assertNotNull(member);
	}

	@Test
	public void testSelectMemberWithLike() {
		List	memberList = null;
		String	str = "raccoon%";

		try {
			memberList = service.selectMemberWithLike(str);
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		assertTrue(memberList.size() > 0);
	}
}
